#ifndef _TEST_APP
#define _TEST_APP


#include "ofMain.h"
#include "ofxOsc.h"

// listen on port 1236
#define PORT 1236
#define NUM_MSG_STRINGS 20
#define MAX_PLAYERS 12
#define BUFF 256


class testApp : public ofBaseApp{

	public:
		testApp(int,int,int,int);
		void setup();
		void update();
		void draw();

		void keyPressed  (int key);
//		void keyReleased(int key);
		void mouseMoved(int x, int y );
		void mouseDragged(int x, int y, int button);
		void mousePressed(int x, int y, int button);
		void mouseReleased(int x, int y, int button);
		void windowResized(int w, int h);
		void get_bitmap_from_window(char * imageBuff);
		BITMAPINFO get_bitmap_info(int width, int height);
		void audioReceived 	(float * input, int bufferSize, int nChannels); 
	
	private:
		ofImage bgImage;
		int posxEntrada;
		int posyEntrada;
		int ampleEntrada;
		int altEntrada;

	    int Nplayer;
		ofxOscReceiver	receiver;

		float * left;
		float * right;
		float prop;
		int 	bufferCounter;
		int 	drawCounter;

		int 				camWidth;
		int 				camHeight;

		ofPoint pos_player[MAX_PLAYERS];
		int count[MAX_PLAYERS];
		int size;

};

#endif

